package com.nondo.dean.pay.mapper;

import com.nondo.dean.pay.domain.GoodsOrder;
import com.nondo.dean.pay.domain.GoodsOrderExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface GoodsOrderMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=GoodsOrderSqlProvider.class, method="countByExample")
    long countByExample(GoodsOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @DeleteProvider(type=GoodsOrderSqlProvider.class, method="deleteByExample")
    int deleteByExample(GoodsOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Delete({
        "delete from pay_goods_order",
        "where goods_order_id = #{goodsOrderId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String goodsOrderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Insert({
        "insert into pay_goods_order (goods_order_id, goods_id, ",
        "goods_name, amount, ",
        "user_id, status, ",
        "pay_order_id, channel_id, ",
        "channel_user_id, create_time, ",
        "update_time)",
        "values (#{goodsOrderId,jdbcType=VARCHAR}, #{goodsId,jdbcType=VARCHAR}, ",
        "#{goodsName,jdbcType=VARCHAR}, #{amount,jdbcType=BIGINT}, ",
        "#{userId,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, ",
        "#{payOrderId,jdbcType=VARCHAR}, #{channelId,jdbcType=VARCHAR}, ",
        "#{channelUserId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(GoodsOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @InsertProvider(type=GoodsOrderSqlProvider.class, method="insertSelective")
    int insertSelective(GoodsOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=GoodsOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="goods_order_id", property="goodsOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.BIGINT),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_user_id", property="channelUserId", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<GoodsOrder> selectByExampleWithRowbounds(GoodsOrderExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=GoodsOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="goods_order_id", property="goodsOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.BIGINT),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_user_id", property="channelUserId", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<GoodsOrder> selectByExample(GoodsOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Select({
        "select",
        "goods_order_id, goods_id, goods_name, amount, user_id, status, pay_order_id, ",
        "channel_id, channel_user_id, create_time, update_time",
        "from pay_goods_order",
        "where goods_order_id = #{goodsOrderId,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="goods_order_id", property="goodsOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.BIGINT),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_user_id", property="channelUserId", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    GoodsOrder selectByPrimaryKey(String goodsOrderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=GoodsOrderSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") GoodsOrder record, @Param("example") GoodsOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=GoodsOrderSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") GoodsOrder record, @Param("example") GoodsOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=GoodsOrderSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(GoodsOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_goods_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Update({
        "update pay_goods_order",
        "set goods_id = #{goodsId,jdbcType=VARCHAR},",
          "goods_name = #{goodsName,jdbcType=VARCHAR},",
          "amount = #{amount,jdbcType=BIGINT},",
          "user_id = #{userId,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "pay_order_id = #{payOrderId,jdbcType=VARCHAR},",
          "channel_id = #{channelId,jdbcType=VARCHAR},",
          "channel_user_id = #{channelUserId,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP}",
        "where goods_order_id = #{goodsOrderId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(GoodsOrder record);
}